package com.woniuxy.controller;

import org.springframework.lang.Nullable;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

/**
 * springmvc2.5之前创建Hanler只有一个办法就是要自定义的类实现Controller接口
 */
public class HelloController implements Controller{
    @Nullable
    @Override
    public ModelAndView handleRequest(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws Exception {
        System.out.println("HelloController====>handleRequest");
        ModelAndView modelAndView=new ModelAndView();
        modelAndView.setViewName("/welcome.jsp");
        return modelAndView;
    }
}
